package com.yanjiali.enumerate;

/**
 * @Package: com.yanjiali.enumerate
 * @Author: yanjiali
 * @Created: 2025/4/13 19:58
 * 文件类型枚举类
 */
public enum FileTypeEnum {
    IMAGE("images", new String[]{"jpg", "jpeg", "png", "gif", "webp"}),
    DOCUMENT("documents", new String[]{"pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt"}),
    VIDEO("videos", new String[]{"mp4", "mov", "avi", "mkv"}),
    AUDIO("audios", new String[]{"mp3", "wav", "ogg"}),
    ARCHIVE("archives", new String[]{"zip", "rar", "7z", "tar.gz"});

    private final String typeName;  //同时也是对应minio上的桶名
    private final String[] allowedExtensions;

    FileTypeEnum(String typeName, String[] allowedExtensions) {
        this.typeName = typeName;
        this.allowedExtensions = allowedExtensions;
    }

    public String[] getAllowedExtensions() {
        return allowedExtensions;
    }

    public String getTypeName() {
        return typeName;
    }
}
